package io.persimmon.core.module.trace;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;

import java.io.Serializable;
import java.util.Date;

@Data
@Slf4j
public class TraceInfo implements Serializable {
    private Logger logger;
    private Date time;
    private String msg;
    private Object data;

    public TraceInfo(Logger logger, String msg, Object... data) {
        this.logger = logger;
        this.time = new Date();
        this.msg = msg;
        this.data = data;
    }

    public TraceInfo(Logger logger, String msg) {
        this(logger, msg, null);
    }
}
